<!-- 轮播 -->
<template>
  <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
  <van-swipe-item v-for="item in swiperList" :key="item.imgSrc"><img :src="item.imgSrc" alt=""></van-swipe-item>
</van-swipe>
</template>
<script setup lang="ts">
import axios from 'axios';
import { ref } from 'vue';
interface swiperData{
  imgSrc:string,
  link:string
}
const swiperList=ref<swiperData[]>([])
axios({
    url:'/swiperList',
    method:'get'
  }).then(res=>{
    // console.log('获取轮播图数据',res.data);
    swiperList.value = res.data.result
  })
</script>
<style lang="less" scoped>
  .my-swipe{
   img{
    width: 100%;
   }
  }
</style>